﻿using System;
using System.IO;
using System.Security.AccessControl;
using Rhino.Commons;

namespace FileUtils {
	public static class DirectoryEx {
		private static IDirectory innerImpl {
			get { return IoC.Resolve<IDirectory>(); }
		}

		public static DirectoryInfo CreateDirectory(string path, DirectorySecurity security) {
			return innerImpl.CreateDirectory(path, security);
		}

		public static DirectoryInfo CreateDirectory(string path) {
			return innerImpl.CreateDirectory(path);
		}

		public static void Delete(string path, bool recursive) {
			innerImpl.Delete(path, recursive);
		}

		public static void Delete(string path) {
			innerImpl.Delete(path);
		}

		public static bool Exists(string path) {
			return innerImpl.Exists(path);
		}

		public static DirectorySecurity GetAccessControl(string path, AccessControlSections sections) {
			return innerImpl.GetAccessControl(path, sections);
		}

		public static DirectorySecurity GetAccessControl(string path) {
			return innerImpl.GetAccessControl(path);
		}

		public static DateTime GetCreationTime(string path) {
			return innerImpl.GetCreationTime(path);
		}

		public static DateTime GetCreationTimeUtc(string path) {
			return innerImpl.GetCreationTimeUtc(path);
		}

		public static string GetCurrentDirectory() {
			return innerImpl.GetCurrentDirectory();
		}

		public static string[] GetDirectories(string path, string searchPattern, SearchOption option) {
			return innerImpl.GetDirectories(path, searchPattern, option);
		}

		public static string[] GetDirectories(string path, string searchPattern) {
			return innerImpl.GetDirectories(path, searchPattern);
		}

		public static string[] GetDirectories(string path) {
			return innerImpl.GetDirectories(path);
		}

		public static string GetDirectoryRoot(string path) {
			return innerImpl.GetDirectoryRoot(path);
		}

		public static string[] GetFiles(string path, string searchPattern, SearchOption option) {
			return innerImpl.GetFiles(path, searchPattern, option);
		}

		public static string[] GetFiles(string path, string searchPattern) {
			return innerImpl.GetFiles(path, searchPattern);
		}

		public static string[] GetFiles(string path) {
			return innerImpl.GetFiles(path);
		}

		public static string[] GetFileSystemEntries(string path, string searchPattern) {
			return innerImpl.GetFileSystemEntries(path, searchPattern);
		}

		public static string[] GetFileSystemEntries(string path) {
			return innerImpl.GetFileSystemEntries(path);
		}

		public static DateTime GetLastAccessTime(string path) {
			return innerImpl.GetLastAccessTime(path);
		}

		public static DateTime GetLastAccessTimeUtc(string path) {
			return innerImpl.GetLastAccessTimeUtc(path);
		}

		public static DateTime GetLastWriteTime(string path) {
			return innerImpl.GetLastWriteTime(path);
		}

		public static DateTime GetLastWriteTimeUtc(string path) {
			return innerImpl.GetLastWriteTimeUtc(path);
		}

		public static string[] GetLogicalDrives() {
			return innerImpl.GetLogicalDrives();
		}

		public static DirectoryInfo GetParent(string path) {
			return innerImpl.GetParent(path);
		}

		public static void Move(string sourceDirName, string destDirName) {
			innerImpl.Move(sourceDirName, destDirName);
		}

		public static void SetAccessControl(string path, DirectorySecurity security) {
			innerImpl.SetAccessControl(path, security);
		}

		public static void SetCreationTime(string path, DateTime creationTime) {
			innerImpl.SetCreationTime(path, creationTime);
		}

		public static void SetCreationTimeUtc(string path, DateTime creationTime) {
			innerImpl.SetCreationTimeUtc(path, creationTime);
		}

		public static void SetCurrentDirectory(string path) {
			innerImpl.SetCurrentDirectory(path);
		}

		public static void SetLastAccessTime(string path, DateTime lastAccessTime) {
			innerImpl.SetLastAccessTime(path, lastAccessTime);
		}

		public static void SetLastAccessTimeUtc(string path, DateTime lastAccessTime) {
			innerImpl.SetLastAccessTimeUtc(path, lastAccessTime);
		}

		public static void SetLastWriteTime(string path, DateTime lastWriteTime) {
			innerImpl.SetLastWriteTime(path, lastWriteTime);
		}

		public static void SetLastWriteTimeUtc(string path, DateTime lastWriteTime) {
			innerImpl.SetLastWriteTimeUtc(path, lastWriteTime);
		}
	}
}